<html>
<head>
<title>Student.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.s0 { color: #cf8e6d;}
.s1 { color: #bcbec4;}
.s2 { color: #bcbec4;}
.s3 { color: #7a7e85;}
.s4 { color: #6aab73;}
</style>
</head>
<body bgcolor="#1e1f22">
<table CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#606060" >
<tr><td><center>
<font face="Arial, Helvetica" color="#000000">
Student.java</font>
</center></td></tr></table>
<pre><span class="s0">public class </span><span class="s1">Student </span><span class="s2">{</span>
    <span class="s0">private </span><span class="s1">String name</span><span class="s2">;</span>
    <span class="s0">private </span><span class="s1">Computer computer</span><span class="s2">;</span>

    <span class="s3">// 构造函数</span>
    <span class="s0">public </span><span class="s1">Student</span><span class="s2">(</span><span class="s1">String name</span><span class="s2">, </span><span class="s1">Computer computer</span><span class="s2">) {</span>
        <span class="s0">this</span><span class="s2">.</span><span class="s1">name </span><span class="s2">= </span><span class="s1">name</span><span class="s2">;</span>
        <span class="s0">this</span><span class="s2">.</span><span class="s1">computer </span><span class="s2">= </span><span class="s1">computer</span><span class="s2">;</span>
    <span class="s2">}</span>

    <span class="s3">// 输出学生使用的电脑配置</span>
    <span class="s0">public void </span><span class="s1">printComputerInfo</span><span class="s2">() {</span>
        <span class="s1">System</span><span class="s2">.</span><span class="s1">out</span><span class="s2">.</span><span class="s1">println</span><span class="s2">(</span><span class="s1">name </span><span class="s2">+ </span><span class="s4">&quot; 使用的电脑配置为: &quot; </span><span class="s2">+ </span><span class="s1">computer</span><span class="s2">.</span><span class="s1">getConfiguration</span><span class="s2">());</span>
    <span class="s2">}</span>
<span class="s2">}</span></pre>
</body>
</html>